/********************************************************/
/*	Copyright (C) 2016 Gong Li Bin		 	*/
/*	Project:	GoLib-1.0.0			*/
/*	Author:		gong_libin			*/
/*	Date:		2016_01_01			*/
/*	File:		GoPb.go				*/
/********************************************************/

package GoPro

import (
	"github.com/golang/protobuf/proto"
)

func GoPbBool(v bool) *bool {
	return proto.Bool(v)
}

func GoPbInt32(v int32) *int32 {
	return proto.Int32(v)
}

func GoPbInt64(v int64) *int64 {
	return proto.Int64(v)
}

func GoPbUint32(v uint32) *uint32 {
	return proto.Uint32(v)
}

func GoPbUint64(v uint64) *uint64 {
	return proto.Uint64(v)
}

func GoPbString(v string) *string {
	return proto.String(v)
}

func GoPbFloat32(v float32) *float32 {
	return proto.Float32(v)
}

func GoPbFloat64(v float64) *float64 {
	return proto.Float64(v)
}

func GoPbMarshal(m proto.Message) ([]byte, error) {
	return  proto.Marshal(m)
}

func GoPbUnmarshal(b []byte, m proto.Message) error {
	return proto.Unmarshal(b, m)
}
